package com.dcloud.streamweb.taskmanage.service;

import com.dcloud.streamweb.taskmanage.entity.JobConfig;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dcloud.streamweb.taskmanage.entity.SavepointBackup;
import com.dcloud.streamweb.taskmanage.entity.dto.JobConfigDTO;
import com.dcloud.streamweb.taskmanage.entity.req.StartJobConfigReq;
import com.dcloud.streamweb.taskmanage.entity.req.StopJobConfigReq;
import org.jeecg.common.system.vo.LoginUser;

import java.util.List;

/**
 * @Description: job_config
 * @Author: jeecg-boot
 * @Date:   2024-06-26
 * @Version: V1.0
 */
public interface IJobConfigService extends IService<JobConfig> {

    void addJob(JobConfigDTO dto);

    void startJob(StartJobConfigReq startJobConfigReq, LoginUser sysUser);

    /**
     * 单个查询任务详情
     *
     * @author zhuhuipei
     * @date 2020-07-14
     * @time 23:05
     */
    JobConfigDTO getJobConfigById(Long id);

    void updateStatusByStart(Long id, String userName, Long jobRunLogId, Integer version);

    void updateJobConfigById(JobConfigDTO jobConfigDTO);

    void stop(StopJobConfigReq stopJobConfigReq, LoginUser sysUser);

    void savepoint(Long id);

    List<SavepointBackup> savepointHitory(Long jobConfigId);
}
